<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../core/include.inc.jsp"%>

<style>
    .pageFormContent p {
        width: 90%;
    }
</style>

<div class="pageContent">
    <form method="post" action="user_module_edit" class="pageForm required-validate"
          onsubmit="return validateCallback(this, dialogAjaxDone)">

        <div class="pageFormContent nowrap" layoutH="57">

            <input type="hidden" name="id" readonly="readonly" value="${module.id}" />

            <p>
                <label>模块名称</label>
                <c:choose>
                    <c:when test="${module.module.parentId==0}" >
                        <input type="text" name="name" class="required" readonly maxlength="20" value="${module.name}" />
                    </c:when>
                    <c:otherwise>
                        <input type="text" name="name" class="required" maxlength="20" value="${module.name}" />
                    </c:otherwise>
                </c:choose>

            </p>

            <p>
                <label>排序</label>
                <input type="text" name="sort" class="digits required" maxlength="20" value="${module.sort}" />
            </p>

            <p>
                <label>状态</label>
                <select class="combox" name="status" id="user_module_status">
                    <option value="1">上线</option>
                    <option value="2">下线</option>
                </select>
            </p>

        </div>
        <div class="formBar">
            <ul>
                <li>
                    <div class="buttonActive">
                        <div class="buttonContent" style="text-align: center;">
                            <button type="submit">保存</button>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </form>
</div>
<script>

    $(function () {
        $('#user_module_status').val('${module.status}');
    });

</script>